/*
 * HandlerCase.cpp
 *
 *  Created on: 2012-12-7
 *      Author: yangentao@gmail.com
 */


#include "test.h"
#include "../src/yet/ThreadHandler.h"


using namespace  yet;
static void onMsg(Message msg){
	cout<<msg.msg<<endl;
}
static void test(){
	ThreadHandler h;
	h.addHandler(&onMsg);
	h.start();
	h.post(Message(2));
	h.post(Message(9));
//	h.post(Message(0));
//	Sleep(100);
	h.quit();
	h.waitFinish();
}

TEST(Handler, a){
	test();
	EXPECT_TRUE(true);
}
